Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify the logging API #2276

Merged
merged 4 commits into from
Mar 15, 2021
Merged

Unify the logging API #2276

merged 4 commits into from
Mar 15, 2021

Conversation

nirinchev
Copy link
Member

@nirinchev nirinchev commented Mar 2, 2021

Description

This introduces a new Logger class that will be used (eventually) for all Realm-originating messages. Currently it's used for messages from Sync and those from managed code. We'll need to refactor OS to ensure that Core-originating messages also use the SDK-provided logger.

The motivation of this entire thing is twofold:

  1. There are some platforms where stdout/stderr output is swallowed - such as the dotnet cli: Expose an API for SDKs to set a custom logger realm-core#4485
  2. Unity doesn't have a way to output Console.WriteLine messages and instead uses its own Debug.Log mechanism: Use Debug.Log as default logger for Unity projects #2277

TODO

  • Changelog entry
  • Tests (if applicable)
  • Filter messages based on the log level

@nirinchev nirinchev marked this pull request as ready for review March 3, 2021 16:56
@nirinchev nirinchev requested review from papafe and LaPeste March 3, 2021 16:56
.editorconfig Show resolved Hide resolved
@nirinchev nirinchev mentioned this pull request Mar 4, 2021
2 tasks
Copy link
Contributor

@LaPeste LaPeste left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's overall a good idea to have a unified logger whose implementation is supplied by the SDK. It'll make life easier for everyone developing on the SDKs.

@nirinchev nirinchev merged commit e673a90 into master Mar 15, 2021
@nirinchev nirinchev deleted the ni/logging branch March 15, 2021 19:15
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants